package net.jxtz.jxtzos.entity.auth;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * @author a123
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("system_wechat")
@EqualsAndHashCode(of = "unionid")
public class Wechat implements Serializable {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    @TableField(value = "open_id")
    private String openid;

    @TableField(value = "nike_name")
    private String nickname;

    private Integer sex;

    private String province;

    private String city;

    private String country;

    @TableField(value = "head_img_url")
    private String headimgurl;

    @TableField(exist = false)
    private List<String> privilege;

    /**
     * 唯一标识 union_id
     */
    @TableField(value = "union_id")
    private String unionid;

    @TableField(fill = FieldFill.INSERT)
    private Integer createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Integer updateTime;

    @TableLogic
    private Integer deleted;
}
